home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / XML Utilities / Professional Programmer XSL IDE / Xselerator25.msi / Data.Cab / F25146_Trim.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2001-10-04  |  976 b   |  31 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" ><xsl:output method="xml" indent="yes"/>
  3. <xsl:include href="TrimL.xsl" />
  4. <xsl:include href="TrimR.xsl" />
  5.  
  6. <xsl:template name="Trim">
  7.     
  8.     <!--This template will recursively trim the trailing spaces from a string-->
  9.        <xsl:param name="strInput" select="''"/>
  10.  
  11.     <!-- Call the template that will trim off Left spaces (recursively, of course ) -->
  12.     <xsl:variable name="InputL">
  13.  
  14.         <xsl:call-template name="TrimL" >
  15.             <xsl:with-param name="strInput" select="$strInput"/>
  16.         </xsl:call-template>
  17.     </xsl:variable>
  18.  
  19.     <!-- Call the template that will trim off right spaces (recursively, of course ) -->
  20.     <xsl:variable name="InputR">
  21.         <xsl:call-template name="TrimR" >
  22.             <xsl:with-param name="strInput" select="$InputL"/>
  23.         </xsl:call-template>
  24.     </xsl:variable>
  25.  
  26.     <xsl:value-of select="$InputR" />
  27.  
  28. </xsl:template>
  29.  
  30. </xsl:stylesheet>
  31.